package com.hrms.hrms_recruitment.service;

import com.hrms.common.vo.ResultMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.Map;

@Service
@FeignClient(value = "hrms-workflow")
public interface RecruitClient {
    @PostMapping("/hrms-workflow/recruit/start")
    ResultMessage recruitStart(@RequestBody HashMap<String, Object> variables);

    @PostMapping("/hrms-workflow/recruit/complete")
    ResultMessage complete(@RequestParam String taskId, @RequestBody HashMap<String, Object> variables);

    @GetMapping("/hrms-workflow/recruit")
    ResultMessage findflow(String name);

    @PostMapping("/hrms-workflow/interview/start")
    ResultMessage interviewStart(@RequestBody Map<String,Object> variables);
}
